package com.ccp.dev.system.model;

import com.ccp.dev.core.basic.model.BaseModel;

import java.util.Objects;

/**
 * 基础动态数据映射
 * @author y
 */
public class SysTenantDynamicData extends BaseModel {
	
	/**
	 * 主键
	 */
	private String tenantDataId;
	
	/**
	 * 数据id
	 */
	private String dataId;
	
	/**
	 * 类名
	 */
	private String className;
	
	/**
	 * 表名
	 */
	private String tableName;

	public String getTenantDataId() {
		return tenantDataId;
	}

	public void setTenantDataId(String tenantDataId) {
		this.tenantDataId = tenantDataId;
	}

	public String getDataId() {
		return dataId;
	}

	public void setDataId(String dataId) {
		this.dataId = dataId;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {return true;}
		if (o == null || getClass() != o.getClass()) {return false;}
		SysTenantDynamicData that = (SysTenantDynamicData) o;
		return Objects.equals(tenantDataId, that.tenantDataId) &&
				Objects.equals(dataId, that.dataId) &&
				Objects.equals(className, that.className) &&
				Objects.equals(tableName, that.tableName);
	}

	@Override
	public int hashCode() {
		return Objects.hash(tenantDataId, dataId, className, tableName);
	}
}
